﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="chakan.aspx.cs" Inherits="admin_chakan" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div>
    <div style="background-image: url('/bookWEB/images/NFLDfog_ZH-CN4846953507_1920x1080.jpg'); width: auto; height: 1000px;">

            
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="ReadersID" DataSourceID="SqlDataSource1" 
            ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                <asp:BoundField DataField="ReadersID" HeaderText="ReadersID" ReadOnly="True" 
                    SortExpression="ReadersID" />
                <asp:BoundField DataField="ReadersNAME" HeaderText="ReadersNAME" 
                    SortExpression="ReadersNAME" />
                <asp:BoundField DataField="ReadersGENDER" HeaderText="ReadersGENDER" 
                    SortExpression="ReadersGENDER" />
                <asp:BoundField DataField="ReadersCLASS" HeaderText="ReadersCLASS" 
                    SortExpression="ReadersCLASS" />
                <asp:BoundField DataField="ReadersCOLLEGE" HeaderText="ReadersCOLLEGE" 
                    SortExpression="ReadersCOLLEGE" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:tsmanagerConnectionString %>" 
            DeleteCommand="DELETE FROM [Readers] WHERE [ReadersID] = @ReadersID" 
            InsertCommand="INSERT INTO [Readers] ([ReadersID], [ReadersNAME], [ReadersGENDER], [ReadersCLASS], [ReadersCOLLEGE]) VALUES (@ReadersID, @ReadersNAME, @ReadersGENDER, @ReadersCLASS, @ReadersCOLLEGE)" 
            SelectCommand="SELECT * FROM [Readers] ORDER BY [ReadersID]" 
            UpdateCommand="UPDATE [Readers] SET [ReadersNAME] = @ReadersNAME, [ReadersGENDER] = @ReadersGENDER, [ReadersCLASS] = @ReadersCLASS, [ReadersCOLLEGE] = @ReadersCOLLEGE WHERE [ReadersID] = @ReadersID">
            <DeleteParameters>
                <asp:Parameter Name="ReadersID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="ReadersID" Type="Int32" />
                <asp:Parameter Name="ReadersNAME" Type="String" />
                <asp:Parameter Name="ReadersGENDER" Type="String" />
                <asp:Parameter Name="ReadersCLASS" Type="String" />
                <asp:Parameter Name="ReadersCOLLEGE" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="ReadersNAME" Type="String" />
                <asp:Parameter Name="ReadersGENDER" Type="String" />
                <asp:Parameter Name="ReadersCLASS" Type="String" />
                <asp:Parameter Name="ReadersCOLLEGE" Type="String" />
                <asp:Parameter Name="ReadersID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
            PostBackUrl="~/Register.aspx" Text="添加用户" />
        <br />
        <br />
        <br />
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" DataKeyNames="ReadersID,librarianID" 
            DataSourceID="SqlDataSource2">
            <Columns>
                <asp:CommandField ShowDeleteButton="True" />
                <asp:BoundField DataField="RM_RTIME" HeaderText="RM_RTIME" 
                    SortExpression="RM_RTIME" />
                <asp:BoundField DataField="RM_LTIME" HeaderText="RM_LTIME" 
                    SortExpression="RM_LTIME" />
                <asp:BoundField DataField="ReadersID" HeaderText="ReadersID" ReadOnly="True" 
                    SortExpression="ReadersID" />
                <asp:BoundField DataField="librarianID" HeaderText="librarianID" 
                    ReadOnly="True" SortExpression="librarianID" />
            </Columns>
            <FooterStyle BackColor="White" ForeColor="#000066" />
            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
            <RowStyle ForeColor="#000066" />
            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#007DBB" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#00547E" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:tsmanagerConnectionString %>" 
            DeleteCommand="DELETE FROM [ReaderManagement] WHERE [ReadersID] = @ReadersID AND [librarianID] = @librarianID" 
            InsertCommand="INSERT INTO [ReaderManagement] ([RM_RTIME], [RM_LTIME], [ReadersID], [librarianID]) VALUES (@RM_RTIME, @RM_LTIME, @ReadersID, @librarianID)" 
            SelectCommand="SELECT * FROM [ReaderManagement]" 
            UpdateCommand="UPDATE [ReaderManagement] SET [RM_RTIME] = @RM_RTIME, [RM_LTIME] = @RM_LTIME WHERE [ReadersID] = @ReadersID AND [librarianID] = @librarianID">
            <DeleteParameters>
                <asp:Parameter Name="ReadersID" Type="Int32" />
                <asp:Parameter Name="librarianID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="RM_RTIME" Type="String" />
                <asp:Parameter Name="RM_LTIME" Type="String" />
                <asp:Parameter Name="ReadersID" Type="Int32" />
                <asp:Parameter Name="librarianID" Type="Int32" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="RM_RTIME" Type="String" />
                <asp:Parameter Name="RM_LTIME" Type="String" />
                <asp:Parameter Name="ReadersID" Type="Int32" />
                <asp:Parameter Name="librarianID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>

            
        </div>
    </div>
    </form>
</body>
</html>
